#pragma once
#include "PokemonDefinition.h"

class PokemonAttack
{
public:
	PokemonAttack(const AttackData& _data);
	PokemonAttack(const PokemonAttack& _source);
	~PokemonAttack();
	
	//Operators overload
	friend std::ostream& operator<<(std::ostream& _out, const PokemonAttack& _attack);
	PokemonAttack& operator=(const PokemonAttack& _source);

	//Setters & Getters
	int GetCurrentPP() const { return m_CurrentPP; }
	bool GetCritical() const { return m_IsCritical; }
	bool GetSuperEfective() const { return m_IsSuperEffective; }
	bool GetNotVeryEffective() const { return m_IsNotVeryEffective; }
	bool GetMiss() const { return m_HasMissed; }
	void SetCritical(bool _value) { m_IsCritical = _value; }
	void SetSuperEffective(bool _value) { m_IsSuperEffective = _value; }
	void SetNotVeryEffective(bool _value) { m_IsNotVeryEffective = _value; }
	void SetMiss(bool _value) { m_HasMissed = _value; }
	void UseAttack() { if(m_CurrentPP != 0) m_CurrentPP--; }


	AttackData GetAttackData() const { return m_AttackData; }
	void InitAttack();
	void InitAttackStatus();
	void ResetCurrentPP() { m_CurrentPP = m_AttackData.pp; }
	bool IsPhysical() const;

private:
	AttackData m_AttackData;
	int m_CurrentPP;

	bool m_IsCritical;
	bool m_IsSuperEffective;
	bool m_IsNotVeryEffective;
	bool m_HasMissed;
};

